<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <button id = 'btn'>新歌速递</button>
    <ul id="ul">
        
    </ul>
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
    <script>
        const btn = document.getElementById('btn')
        btn.addEventListener('click',()=>{
            $.ajax({
                url:'http://u.ronki.moe:3000/top/song?type=7',
                method:'GET',
                dataType:'json',
                success:function(res){
                    res.data.forEach((song) =>{
                        let li = document.createElement('li')
                        li.innerHTML = song.name
                        document.getElementById('ul').appendChild(li)
                    })

                }
            })
        })
    </script>
</body>
</html>